//
//  NSObject+KVO.h
//  KVO
//
//  Created by eport on 2021/1/9.
//

#import <Foundation/Foundation.h>

typedef void(^WXoberserBlock)(id OberverObject,NSString *observerKey,id oldValue,id newValue);

NS_ASSUME_NONNULL_BEGIN

@interface NSObject (KVO)


-(void)wx_addObserver:(NSObject *)observer
              keyPath:(NSString *)keyPath
            withBlock:(WXoberserBlock)block;

-(void)wx_removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath;

@end

NS_ASSUME_NONNULL_END
